home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / pack / xfh132.lzh / XFH / src / libmygcc / gnulib / divsi3.c < prev    next >
C/C++ Source or Header  |  1993-01-16  |  214b  |  17 lines

  1. #include "common.h"
  2.  
  3. SItype
  4. __divsi3 (a, b)
  5.      SItype a, b;
  6. {
  7.   unsigned SItype q, r;
  8.   int neg = (a < 0) != (b < 0);
  9.  
  10.   if (a < 0) a = -a;
  11.   if (b < 0) b = -b;
  12.  
  13.   divmodu (q, r, a, b);
  14.  
  15.   return neg ? -q : q;
  16. }
  17.